package com.sunwoda.springbootredis.redislock;

import java.util.concurrent.TimeUnit;

/**
 * @author 2007130280
 */
public interface RedisLock2 {

    /**
     * @Description: 加锁
     * @Param:
     * @return:
     * @Author: SGR
     * @Date: 2021-09-15
     */
    boolean tryLock(String key, String value, long timeout, TimeUnit timeUnit);

    /**
     * @Description: 释放锁
     * @Param:
     * @return:
     * @Author: SGR
     * @Date: 2021-09-15
     */
    void releaseLock(String key,String value);
}
